import { defineStore } from "pinia";

export const useUserStore =  defineStore('user', {
    state() {
        return {
            user: {
                username: '',
                isLogin:''
            }
        }
    },
    actions: {
        setUser(user: object) {
            this.user = user
            console.log(user)
        },
        clearUser() {
            this.user = {
                username: '',
                isLogin:false
            }
        }
    }
})